package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.ZjCollectionsMapper;
import com.education.wisdom.pojo.ZjCollections;
import com.education.wisdom.service.IZjCollectionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 章节收藏 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-02
 */
@Service
public class ZjCollectionsServiceImpl implements IZjCollectionsService
{
	@Autowired
	private ZjCollectionsMapper zjCollectionsMapper;

	/**
     * 查询章节收藏信息
     * 
     * @param userId 收藏人ID
     * @return 章节收藏信息
     */
    @Override
	public ZjCollections selectZjCollectionsById(Map<String,Object> map)
	{
	    return zjCollectionsMapper.selectZjCollectionsById(map);
	}
	
	/**
     * 查询章节收藏列表
     * 
     * @param zjCollections 章节收藏信息
     * @return 章节收藏集合
     */
	@Override
	public List<ZjCollections> selectZjCollectionsList(ZjCollections zjCollections)
	{
	    return zjCollectionsMapper.selectZjCollectionsList(zjCollections);
	}
	
    /**
     * 新增章节收藏
     * 
     * @param zjCollections 章节收藏信息
     * @return 结果
     */
	@Override
	public int insertZjCollections(ZjCollections zjCollections)
	{
	    return zjCollectionsMapper.insertZjCollections(zjCollections);
	}
	
	/**
     * 修改章节收藏
     * 
     * @param zjCollections 章节收藏信息
     * @return 结果
     */
	@Override
	public int updateZjCollections(ZjCollections zjCollections)
	{
	    return zjCollectionsMapper.updateZjCollections(zjCollections);
	}

	/**
     * 删除章节收藏对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteZjCollectionsByIds(String ids)
	{
		return zjCollectionsMapper.deleteZjCollectionsByIds(Convert.toStrArray(ids));
	}
	
}
